﻿using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VRB_0._1
{
    class TextureObject : VisualObject
    {
        public Texture2D Texture;

        public override int Width
        {
            get { return Texture.Width; }
        }
        public override int Height
        {
            get { return Texture.Height; }
        }

        public virtual void Initialize(Viewport viewport, Texture2D texture, Vector2 position)
        {
            base.Initialize(viewport, position);
            this.Texture = texture;
            this.Active = true;
        }
        public override void Update(GameTime gameTime)
        {
        }
        public override void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(Texture, Position, null, Color.White, 0f,
                new Vector2(Width / 2, Height / 2), 1f, SpriteEffects.None, 0f);
        }
    }
}
